package com.zhaojindong.ioc.component.register.scopeandlazy;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * @description: config
 * @author: zhaojindong
 * @create: 2018-08-13 20:50:27
 **/
@Configuration
public class MainConfig {

    /**
     * test lazy and singleton
     * @return
     */
//    @Lazy
    @Bean
    @Scope("prototype")
    public Person person() {
        return new Person(25, "zhaojindong");
    }
}
